<template>
	<view class="control-page">
		<scroll-view scroll-y="true">
			<u-tabs :list="tabList" :scrollable='false' @click="handleChange"></u-tabs>
			<div class="tab-item" v-show="current == '配置'">
				<slot name="configure"></slot>
			</div>
			<div class="tab-item" v-show="current == '预览'">
				<slot name="preview"></slot>
			</div>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabList: [{
					name: '配置'
				}, {
					name: '预览'
				}],
				current: '配置',
			};
		},
		methods: {
			handleChange(e) {
				this.current = e.name
			},
		},
	}
</script>

<style lang="scss" scoped>
	.control-page {
	}
</style>
